package nc.ui.ewm.workorder.command;

import nc.ui.am.common.command.LastPageCommand;
import nc.vo.am.common.util.StatusTypeUtils;
import nc.vo.am.common.util.StatusUtils;

public class LastlyCommand extends LastPageCommand {

	public LastlyCommand() {
		super();
	}

	public void execute() throws Exception {
		if (getTabbedDataManager().hasNext()) {
			getTabbedDataManager().last();
			if (!getTabbedDataManager().hasPrev()) {
				getBasePanel().toStatus(StatusTypeUtils.pagination,
						StatusUtils.firstPage);
			} else if (!getTabbedDataManager().hasNext()) {
				getBasePanel().toStatus(StatusTypeUtils.pagination,
						StatusUtils.lastPage);
			} else {
				getBasePanel().toStatus(StatusTypeUtils.pagination,
						StatusUtils.normalPage);
			}
		}
		showHintMessage(get("common", "UCH032")/* @res "ĩҳ" */);
	}

}
